<?php
// +----------------------------------------------------------------------
// |
// +----------------------------------------------------------------------
// |
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// |
// +----------------------------------------------------------------------

namespace app\model;

use think\Model;

class UserBalanceLog extends Model
{
	protected $name               = 'user_balance_log';
	protected $autoWriteTimestamp = true;
	protected $insert             = [];
	protected $update             = [];

	const TYPE_REAL_TIME    = 1; // 即时到账
	const TYPE_NEED_RECEIVE = 2; // 进入账户余额，需要提现

	const SCENE_SHARE_ORDER  = 1; // 分享商品下单佣金
	const SCENE_REGISTER     = 2; // 注册激励佣金
	const SCENE_INVITE       = 3; // 邀请注册佣金
	const SCENE_CREATE_ORDER = 4; // 下单佣金
	const SCENE_TEAM         = 5; // 团队佣金

	const ACCOUNT_STATUS_WAIT      = 0; // 未完成
	const ACCOUNT_STATUS_COMPLETED = 1; // 已完成
	const ACCOUNT_STATUS_FAIL      = 2; // 失败
	const ACCOUNT_STATUS_REVOKE    = 3; // 已撤销


	const STATUS_WAIT      = 20; // 待结算
	const STATUS_COMPLETED = 100; // 已结算
	const STATUS_CANCEL    = 200; // 取消结算
}